package com.hightrast.service.compareToData.stage.impl;

import com.hightrast.service.api.entity.RastProductImages;
import com.hightrast.service.compareToData.stage.EntityComparator;

import java.util.Objects;

/**
 * 商品图片 比较策略实现
 */
public class RastProductImagesComparator implements EntityComparator<RastProductImages> {
    @Override
    public boolean areEqual(RastProductImages newEntity, RastProductImages oldEntity) {
        return Objects.equals(newEntity.getProductId(), oldEntity.getProductId()) &&
                Objects.equals(newEntity.getPosition(), oldEntity.getPosition()) &&
                Objects.equals(newEntity.getSrc(), oldEntity.getSrc()) &&
                Objects.equals(newEntity.getVariantIds(), oldEntity.getVariantIds());
    }
}